package com.jy.appmarket.network.resultdata;

import com.jy.app.market.idata.Doc;
import com.jy.app.market.idata.data.Drift;

/**
 * 类说明：
 * 
 * @author kaixun.huang
 * @date 2014-5-7
 * @version 1.0
 */

public class DriftResult extends BaseResultData {
	private Drift mDrift;

	public Drift getDrift() {
		return mDrift;
	}

	@Override
	public boolean parseResult(String result) {
		Doc doc = Doc.fromJson(result);
		if (!doc.isOk()) {
			return false;
		}

		setDataType(doc.getDataType());
		setStatus(doc.getStatus());
		setMessage(doc.getMessage());

		if (doc.isType(Drift.class)) {
			mDrift = doc.getData();
		}
		return true;
	}
}
